package com.ruoyi.bookbus.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bookbus.mapper.BookOrderItemMapper;
import com.ruoyi.bookbus.domain.BookOrderItem;
import com.ruoyi.bookbus.service.IBookOrderItemService;

/**
 * 订单详情Service业务层处理
 * 
 * @author zsq-cj
 * @date 2025-10-21
 */
@Service
public class BookOrderItemServiceImpl implements IBookOrderItemService 
{
    @Autowired
    private BookOrderItemMapper bookOrderItemMapper;

    /**
     * 查询订单详情
     * 
     * @param id 订单详情主键
     * @return 订单详情
     */
    @Override
    public BookOrderItem selectBookOrderItemById(Long id)
    {
        return bookOrderItemMapper.selectBookOrderItemById(id);
    }

    /**
     * 查询订单详情列表
     * 
     * @param bookOrderItem 订单详情
     * @return 订单详情
     */
    @Override
    public List<BookOrderItem> selectBookOrderItemList(BookOrderItem bookOrderItem)
    {
        return bookOrderItemMapper.selectBookOrderItemList(bookOrderItem);
    }

    /**
     * 新增订单详情
     * 
     * @param bookOrderItem 订单详情
     * @return 结果
     */
    @Override
    public int insertBookOrderItem(BookOrderItem bookOrderItem)
    {
        return bookOrderItemMapper.insertBookOrderItem(bookOrderItem);
    }

    /**
     * 修改订单详情
     * 
     * @param bookOrderItem 订单详情
     * @return 结果
     */
    @Override
    public int updateBookOrderItem(BookOrderItem bookOrderItem)
    {
        return bookOrderItemMapper.updateBookOrderItem(bookOrderItem);
    }

    /**
     * 批量删除订单详情
     * 
     * @param ids 需要删除的订单详情主键
     * @return 结果
     */
    @Override
    public int deleteBookOrderItemByIds(Long[] ids)
    {
        return bookOrderItemMapper.deleteBookOrderItemByIds(ids);
    }

    /**
     * 删除订单详情信息
     * 
     * @param id 订单详情主键
     * @return 结果
     */
    @Override
    public int deleteBookOrderItemById(Long id)
    {
        return bookOrderItemMapper.deleteBookOrderItemById(id);
    }
}
